def get_mime_type(ext):
    """根据文件扩展名获取 MIME 类型"""
    mime_types = {
        'mp4': 'video/mp4',
        'mov': 'video/quicktime',
        'avi': 'video/x-msvideo',
        'wmv': 'video/x-ms-wmv',
        'flv': 'video/x-flv',
        'webm': 'video/webm',
        'm3u8': 'application/x-mpegURL'
    }
    return mime_types.get(ext.lower(), 'video/mp4') 